package cn.wonderland.feign;

import cn.wonderland.domain.User;
import cn.wonderland.fallback.UserFeignFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "user-server",path = "user", fallbackFactory = UserFeignFallBackFactory.class)
public interface UserFeignClient {

    @GetMapping("/{userId}")
    User getUser(@PathVariable("userId") Long userId);
}
